package com.cosina.game.crystallight.ui.monster;

import android.graphics.Bitmap;

import com.cosina.game.crystallight.ui.ResourceManager;
import com.cosina.game.crystallight.util.BitmapUtil;

public class MonsterResource {
	
	public static final String ResourcePath = "img/cardinal/monsters/";
	public static void init(){
		for(int y=1; y < frameInfo.length; y++) {
			Bitmap rawBitmap =ResourceManager.getNoCahce(ResourcePath + "m" + y + ".png");
			
			int width = rawBitmap.getWidth();
			int height = rawBitmap.getHeight();
			int frameCount = frameInfo[y][1];
			Bitmap[] result = BitmapUtil.cut(rawBitmap, frameCount, -1);
			int key = frameInfo[y][0];
			MonsterFrames mf = new MonsterFrames(result, (44-width/frameCount)/2, (44-height)/2);
			monsterBitmaps[key] = mf;
		}
	}
	
	public static int[][] frameInfo = {
			{0,0,0}, 
			{1,4,4},	//realy start point
			{2,4,1},
			{3,6,6},
			{4,4,1},
			{5,20,5},
			{6,12,3},
			{7,12,3},
			{8,4,1},
			{9,4,1},
			{10,4,1},
			{11,4,1},
			{12,8,2},
			{13,4,1},
			{14,4,1},
			{15,6,6},
	};
	public static MonsterFrames[] monsterBitmaps = new MonsterFrames[16];
}
